let data={
    msg:{name:"刘济泽",id:1903010325,class:"19应用3-3班"},
    ImgColor:["#8A2BE2","#4169E1","#FFB6C1","#7FFFAA"],
    ImgSrc:["img/img1.jpg","img/img2.jpg","img/img3.jpg","img/img4.jpg"]
};

/*
let b = document.querySelectorAll("#div1 div")
b[0].textContent=data.msg.class
b[1].textContent=data.msg.id
b[2].textContent=data.msg.name
*/

//此处开始是for循环写入：
let b = document.querySelectorAll("#div1 div")
let j=2
for (let i in data.msg){
    b[j].textContent=data.msg[i]
    j=j-1
};

